package com.example.demo.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsMessagingTemplate;

import javax.jms.TextMessage;

public class Topic_Consumer {


    @JmsListener(destination = "${myqueue}")
    public void receive(TextMessage text) throws Exception {
        System.out.println("消费者收到信息" + text.getText());
    }
}
